package com.nondo.dean.pay.mapper;

import com.nondo.dean.pay.domain.IapReceipt;
import com.nondo.dean.pay.domain.IapReceiptExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.session.RowBounds;
import org.apache.ibatis.type.JdbcType;

public interface IapReceiptMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table pay_iap_receipt
     *
     * @mbg.generated Wed Jan 31 17:46:05 CST 2018
     */
    @SelectProvider(type=IapReceiptSqlProvider.class, method="countByExample")
    long countByExample(IapReceiptExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table pay_iap_receipt
     *
     * @mbg.generated Wed Jan 31 17:46:05 CST 2018
     */
    @DeleteProvider(type=IapReceiptSqlProvider.class, method="deleteByExample")
    int deleteByExample(IapReceiptExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table pay_iap_receipt
     *
     * @mbg.generated Wed Jan 31 17:46:05 CST 2018
     */
    @Delete({
        "delete from pay_iap_receipt",
        "where pay_order_id = #{payOrderId,jdbcType=VARCHAR}"
    })
    int deleteByPrimaryKey(String payOrderId);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table pay_iap_receipt
     *
     * @mbg.generated Wed Jan 31 17:46:05 CST 2018
     */
    @Insert({
        "insert into pay_iap_receipt (pay_order_id, mch_id, ",
        "transaction_id, status, ",
        "handle_count, create_time, ",
        "update_time, receipt_data)",
        "values (#{payOrderId,jdbcType=VARCHAR}, #{mchId,jdbcType=VARCHAR}, ",
        "#{transactionId,jdbcType=VARCHAR}, #{status,jdbcType=TINYINT}, ",
        "#{handleCount,jdbcType=TINYINT}, #{createTime,jdbcType=TIMESTAMP}, ",
        "#{updateTime,jdbcType=TIMESTAMP}, #{receiptData,jdbcType=LONGVARCHAR})"
    })
    int insert(IapReceipt record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table pay_iap_receipt
     *
     * @mbg.generated Wed Jan 31 17:46:05 CST 2018
     */
    @InsertProvider(type=IapReceiptSqlProvider.class, method="insertSelective")
    int insertSelective(IapReceipt record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table pay_iap_receipt
     *
     * @mbg.generated Wed Jan 31 17:46:05 CST 2018
     */
    @SelectProvider(type=IapReceiptSqlProvider.class, method="selectByExampleWithBLOBs")
    @Results({
        @Result(column="pay_order_id", property="payOrderId", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="mch_id", property="mchId", jdbcType=JdbcType.VARCHAR),
        @Result(column="transaction_id", property="transactionId", jdbcType=JdbcType.VARCHAR),
        @Result(column="status", property="status", jdbcType=JdbcType.TINYINT),
        @Result(column="handle_count", property="handleCount", jdbcType=JdbcType.TINYINT),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="receipt_data", property="receiptData", jdbcType=JdbcType.LONGVARCHAR)
    })
    List<IapReceipt> selectByExampleWithBLOBsWithRowbounds(IapReceiptExample example, RowBounds rowBounds);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table pay_iap_receipt
     *
     * @mbg.generated Wed Jan 31 17:46:05 CST 2018
     */
    @SelectProvider(type=IapReceiptSqlProvider.class, method="selectByExampleWithBLOBs")
    @Results({
        @Result(column="pay_order_id", property="payOrderId", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="mch_id", property="mchId", jdbcType=JdbcType.VARCHAR),
        @Result(column="transaction_id", property="transactionId", jdbcType=JdbcType.VARCHAR),
        @Result(column="status", property="status", jdbcType=JdbcType.TINYINT),
        @Result(column="handle_count", property="handleCount", jdbcType=JdbcType.TINYINT),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="receipt_data", property="receiptData", jdbcType=JdbcType.LONGVARCHAR)
    })
    List<IapReceipt> selectByExampleWithBLOBs(IapReceiptExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table pay_iap_receipt
     *
     * @mbg.generated Wed Jan 31 17:46:05 CST 2018
     */
    @SelectProvider(type=IapReceiptSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="pay_order_id", property="payOrderId", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="mch_id", property="mchId", jdbcType=JdbcType.VARCHAR),
        @Result(column="transaction_id", property="transactionId", jdbcType=JdbcType.VARCHAR),
        @Result(column="status", property="status", jdbcType=JdbcType.TINYINT),
        @Result(column="handle_count", property="handleCount", jdbcType=JdbcType.TINYINT),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP)
    })
    List<IapReceipt> selectByExampleWithRowbounds(IapReceiptExample example, RowBounds rowBounds);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table pay_iap_receipt
     *
     * @mbg.generated Wed Jan 31 17:46:05 CST 2018
     */
    @SelectProvider(type=IapReceiptSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="pay_order_id", property="payOrderId", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="mch_id", property="mchId", jdbcType=JdbcType.VARCHAR),
        @Result(column="transaction_id", property="transactionId", jdbcType=JdbcType.VARCHAR),
        @Result(column="status", property="status", jdbcType=JdbcType.TINYINT),
        @Result(column="handle_count", property="handleCount", jdbcType=JdbcType.TINYINT),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP)
    })
    List<IapReceipt> selectByExample(IapReceiptExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table pay_iap_receipt
     *
     * @mbg.generated Wed Jan 31 17:46:05 CST 2018
     */
    @Select({
        "select",
        "pay_order_id, mch_id, transaction_id, status, handle_count, create_time, update_time, ",
        "receipt_data",
        "from pay_iap_receipt",
        "where pay_order_id = #{payOrderId,jdbcType=VARCHAR}"
    })
    @Results({
        @Result(column="pay_order_id", property="payOrderId", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="mch_id", property="mchId", jdbcType=JdbcType.VARCHAR),
        @Result(column="transaction_id", property="transactionId", jdbcType=JdbcType.VARCHAR),
        @Result(column="status", property="status", jdbcType=JdbcType.TINYINT),
        @Result(column="handle_count", property="handleCount", jdbcType=JdbcType.TINYINT),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="receipt_data", property="receiptData", jdbcType=JdbcType.LONGVARCHAR)
    })
    IapReceipt selectByPrimaryKey(String payOrderId);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table pay_iap_receipt
     *
     * @mbg.generated Wed Jan 31 17:46:05 CST 2018
     */
    @UpdateProvider(type=IapReceiptSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") IapReceipt record, @Param("example") IapReceiptExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table pay_iap_receipt
     *
     * @mbg.generated Wed Jan 31 17:46:05 CST 2018
     */
    @UpdateProvider(type=IapReceiptSqlProvider.class, method="updateByExampleWithBLOBs")
    int updateByExampleWithBLOBs(@Param("record") IapReceipt record, @Param("example") IapReceiptExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table pay_iap_receipt
     *
     * @mbg.generated Wed Jan 31 17:46:05 CST 2018
     */
    @UpdateProvider(type=IapReceiptSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") IapReceipt record, @Param("example") IapReceiptExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table pay_iap_receipt
     *
     * @mbg.generated Wed Jan 31 17:46:05 CST 2018
     */
    @UpdateProvider(type=IapReceiptSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(IapReceipt record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table pay_iap_receipt
     *
     * @mbg.generated Wed Jan 31 17:46:05 CST 2018
     */
    @Update({
        "update pay_iap_receipt",
        "set mch_id = #{mchId,jdbcType=VARCHAR},",
          "transaction_id = #{transactionId,jdbcType=VARCHAR},",
          "status = #{status,jdbcType=TINYINT},",
          "handle_count = #{handleCount,jdbcType=TINYINT},",
          "create_time = #{createTime,jdbcType=TIMESTAMP},",
          "update_time = #{updateTime,jdbcType=TIMESTAMP},",
          "receipt_data = #{receiptData,jdbcType=LONGVARCHAR}",
        "where pay_order_id = #{payOrderId,jdbcType=VARCHAR}"
    })
    int updateByPrimaryKeyWithBLOBs(IapReceipt record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table pay_iap_receipt
     *
     * @mbg.generated Wed Jan 31 17:46:05 CST 2018
     */
    @Update({
        "update pay_iap_receipt",
        "set mch_id = #{mchId,jdbcType=VARCHAR},",
          "transaction_id = #{transactionId,jdbcType=VARCHAR},",
          "status = #{status,jdbcType=TINYINT},",
          "handle_count = #{handleCount,jdbcType=TINYINT},",
          "create_time = #{createTime,jdbcType=TIMESTAMP},",
          "update_time = #{updateTime,jdbcType=TIMESTAMP}",
        "where pay_order_id = #{payOrderId,jdbcType=VARCHAR}"
    })
    int updateByPrimaryKey(IapReceipt record);
}